import { createRouter, createWebHistory } from 'vue-router'

import defaultRoutes from './defaultRoutes'
import { useRouterGuard } from './useRouteGuard';


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: defaultRoutes,
})


// 添加拦截器
useRouterGuard(router);

export default router
